<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
    <h:head>
        <title>Coleta Seletiva - Login</title>
        <link href="./css/cadastro.css" rel="stylesheet" type="text/css"/>
    </h:head>
    <h:body>
        <h1>Login de Acesso</h1>
        <fieldset>
            <legend>Por favor informe o nome de usuário e senha ou se não possuir um cadastre-se</legend>
            <h:form>
                <table>
                    <tr>
                        <td>Login de Acesso:</td>
                        <td>
                            <h:inputText 
                                value="#{usuario.login}" 
                                required="true"
                                requiredMessage="É necessário informar o login do usuário"
                                id="login"
                                validator="#{usuario.validaLogin}"
                                title="Login de Acesso"
                            />
                        </td>
                        <td><h:message for="login" styleClass="error"/></td>
                    </tr>
                    <tr>
                        <td>Senha:</td>
                        <td><h:inputSecret value="#{usuario.senha}"/></td><br/>
                    </tr>    
                    <tr>
                        <td></td>
                        <td><h:commandButton value="Conectar" 
                                             action="#{usuario.mostraLogin}"/></td>
                    </tr> 
                </table>
            </h:form>
        </fieldset>

    </h:body>
</html>

